# python setup.py build to create executables

"""
    Copyright 2011 Kacper Żuk <kazuldur@gmail.com>

    This file is part of pyLastPlayer.

    pyLastPlayer is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    pyLastPlayer is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with pyLastPlayer.  If not, see <http://www.gnu.org/licenses/>.
"""

import sys
if not "build" in sys.argv:
    sys.argv.append("build")
    
from cx_Freeze import setup, Executable
import os.path
import PyQt4

base = None
if sys.platform == "win32":
    base = "Win32GUI"

jpgfile = os.path.dirname(PyQt4.__file__) + "\plugins\imageformats\qjpeg4.dll"

buildOptions = dict(
        compressed = True,
        icon = "resources/icon.ico",
        optimize = 2,
        include_files = ["README.txt", "LICENSE.txt", (jpgfile, "imageformats\qjpeg4.dll")]
)

setup(
        name = "pyLastPlayer",
        version = "0.1",
        description = "Simple Last.fm and Libre.fm player",
        options = dict(build_exe = buildOptions),
        executables = [Executable("main.py", base = base, targetName="pyLastPlayer.exe")]
     )
